package org.ttitfly.zuoyue.dao.complaint;

import java.util.List;

import org.springframework.stereotype.Component;
import org.ttitfly.ttcore.mybatis.BaseSqlMapDAO;
import org.ttitfly.zuoyue.entity.complaint.Complaint;
import org.ttitfly.zuoyue.so.complaint.ComplaintSO;
@Component("complaintDao")
public class ComplaintDao extends BaseSqlMapDAO<Complaint> {
	
	private static final String COMPLAINT_COUNT="getComplaintCount";
	
	private static final String COMPLAINT_LIST="getComplaintList";
	
	private static final String COMPLAINT_LIST_BYIDS="getComplaintListByIds";
	
	private static final String COMPLAINT_BY_ID = "getComplaintById";
	
	public int getSOComplaintViewCount(ComplaintSO complaintSO) {
        return super.getPaginatedListCount(COMPLAINT_COUNT, complaintSO);

    }

    public List<Complaint> getSOComplaintView(ComplaintSO complaintSO) {
        return super.getPaginatedList(COMPLAINT_LIST, complaintSO);
    }
    
    public List<Complaint> getComplaintsByIDs(List<Long> complaintIds){
    	return super.getQueryList(COMPLAINT_LIST_BYIDS, complaintIds);
    }

    public Complaint getComplaintById(long id){
    	
    	return getUniqueObject(COMPLAINT_BY_ID, id);
    }
}
